package com.shareyi.joywindow.enumtype;

/**
 * 服务器启动类型枚举值
 * Created by david on 2016/6/10.
 */
public enum  ServerStartType {


    SERVER_WINDOW("1","服务器和窗口均启动"),
    SERVER_ONLY("2","服务器启动"),
    SERVER_SWING("3","服务器和SWING窗口");

    ServerStartType(String type,String name){
        this.type=type;
        this.name=name;
    }


    public static ServerStartType getByType(String type){
        for(ServerStartType serverStartType:values()){
            if(serverStartType.getType().equals(type)){
                return serverStartType;
            }
        }
        return null;
    }

    private String type;
    private String name;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
